public class PLLayerCognition extends PLLayer {
	public PLLayerCognition() {
	}
	
	public PLLayerCognition(String name) {	
		super(name);
		Init();
	}

	protected void finalize() throws Throwable
	{
		Shutdown();
	  //do finalization here
	  super.finalize(); //not necessary if extending Object.
	} 
	
	public boolean Init() {
		return true;
	}


	public boolean Shutdown() {
		return true;
	}

	
	// a layer may be asked to build a response to a query from scratch.
	// returns a new shape as a response and the confidence in this response
	public float BuildResponse(PLShape query, PLOutShape  outResponse) {
		// use the response where most patterns agree
		return 0;
	}	

	// given a query, response pair a layer may be asked to validate the response 
	// and possible return a better match if the confidence in the given response is not high
	public  float ValidateResponse(PLShape query, PLShape response, PLOutShape  outBetterMatch) {
		// use the response where most patterns agree		
		float confidence = 1;		
		return confidence;
	}			

	@Override
	public float ImproveResponse(PLShape query, PLOutShape outResponse, PLShape  betterMatch) {
		// TODO Auto-generated method stub
		return 0;
	}


	
}
